package cn.kow.kmall.pojo.dto;

import cn.kow.kmall.core.jpa.QueryOperatorEnum;
import cn.kow.kmall.core.jpa.annotion.QueryCondition;
import cn.kow.kmall.core.jpa.query.BasePageQuery;
import lombok.*;

import java.util.List;

/**
 * @Author: lijun
 * @Description:
 * @Date: Created in 2020-04-17 15:42
 * @Modified By:
 */
@Data
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ItemQueryDTO extends BasePageQuery {

    @QueryCondition(operator = QueryOperatorEnum.in, column = "id")
    private List<Long> itemIds;

    @QueryCondition(operator = QueryOperatorEnum.like, column = "name")
    private String itemName;

    @QueryCondition
    private Long categoryId;

    @QueryCondition(operator = QueryOperatorEnum.dateRange)
    private String createTime;

    @QueryCondition(operator = QueryOperatorEnum.equal)
    private Short itemStatus;

    @QueryCondition(operator = QueryOperatorEnum.equal)
    private Short status;

    private String orderBy = "createTime desc";
}
